package com.thd.springboottest.ioc.conditionaltest;

import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

/**
 * com.thd.springboottest.ioc.conditionaltest.ConditionalConfiguration
 *
 * @author: wanglei62
 * @DATE: 2022/10/13 15:44
 **/
@Configuration
@Order(100)
public class ConditionalConfigurationa {


    @Bean
    @ConditionalOnMissingBean(ConditionalInterface.class)
    public ConditionalInterface conditionalBeana(){
        return new ConditionalBeana();
    }


}
